package com.example.yjhmatch.controller;


import com.example.common.vo.Result;
import com.example.yjhmatch.service.IBetsService;
import com.yc.yjh.entity.Bets;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 竞猜表 前端控制器
 * </p>
 *
 * @author 廖老师
 * @since 2023-08-03
 */
@RestController
@RequestMapping("/bets/bets")
public class BetsController {
    @Resource
    IBetsService betsService;
    @RequestMapping("addBets")
    public Result addBets(@RequestBody Bets bets){
        betsService.saveOrUpdate(bets);
        return Result.success("预测成功");
    }

}

